<?php
require './curl.php';
$id = $_REQUEST['id'];
$type = $_REQUEST['type'];
echo curl_get_contents(($type ? "https://ptgen.rhilip.workers.dev" : "https://api.douban.workers.dev/")."/?url={$id}");
?>